import http from "@/utils/http.js";

export function getAllCourses() {
    return http({
        method:"GET",
        url:"/courses",
    })
}

export function getAllCategory() {
    return http({
        method:"GET",
        url:"/courses/getAllCategory",
    })
}

export function getAllCoursesTeacher() {
    return http({
        method:"GET",
        url:"/courses/courseTeacher",
    })
}

export function updateCourseTeacher(courseId,course){
    return http({
        method:"PUT",
        url:`/courses/${courseId}`,
        data:course
    })
}

export function addCourse(data){
    return http({
        method:"POST",
        url:"/courses",
        data
    })
}